<%@page import="com.film.domain.Performer"%>
<%@page import="java.util.List" errorPage="500.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>演员管理</title>
<link rel="stylesheet" href="../admin_css/performer.css">
<link rel="stylesheet" href="../admin_css/iconfont/iconfont.css">
<script src="../admin_js/jquery-1.12.4.js"></script>
<script src="../admin_js/performer.js"></script>
</head>
<body>
	<div class="content">
	 <div class="container" style="padding: 0px;width: 100% ;display:"none";">
    <div class="tou"><span class="iconfont icon-zhiyuanguanli"></span><span style="font-weight: bold; margin-left: 6px;">演员信息管理</span></div>
	 <table class="table">
        <caption><span id="sum" style="margin-left: 30px;">演员管理表</span></caption>
        <thead id="table">
        <tr>
         	<th>演员ID</th>
			<th>演员名</th>
			<th>演员英文名</th>
			<th>演员生日</th>
			<!-- <th>演员身高</th> -->
			<th>演员性别</th>
			<th>演员国籍</th>
			<!-- <th>演员出生地</th> -->
			<th>操作</th>
        </tr>
        </thead>
        <c:if test="${!empty performerPage}">
        <tbody id="table">
        	<c:forEach items="${sessionScope.performerPage}" var="per">
            <tr>
                <td id="filmId1">${per.perId}</td>
                <td id="filmName1">${per.perName}</td>
                <td hidden>${per.perNickName}</td>
                <td id="filmCategory1">${per.perTypr}</td>
                <td id="director1">${per.perBirth}</td>
                <td id="screenwriters1" hidden>${per.perHeight}</td>
                <td id="star1">${per.perSex}</td>
                <td id="filmTime1">${per.perNationnality}</td>
           		<td id="playTime1" hidden>${per.perBirthPlace}</td>
           		<td hidden>${per.perStar}</td>
           		<td hidden>${per.perIntroduce}</td>
           		<td hidden>${per.perImg}</td>
                <td>
                	<button class="updateBtn btn btn-default" onclick="updatePerformer(this)"><span>修改</span></button>
                	<button class="detailBtn btn btn-default" onclick="detailPerformer(this)"><span>明细</span></button>
                </td>
            </tr>
            </c:forEach>
         </tbody>
        </c:if>
  	  </table>
    </div>
  	<!--分页-->
    <div id="fenye" class="panel-footer" style="text-align: center; display: block;">
        <nav style="height: 35px;">
            <ul class="pagination" style="margin-top:0px;">
             	 <li id="Previous" class="disabled" onclick="performerPageUp(${performerPageNum})">
                    <a aria-label="Previous" href="javascript:void(0)">
                        <span aria-hidden="true">«</span>
                    </a>
                </li>
             	
				<c:forEach items="${pageNum}" var = "num">
					<c:if test="${performerPageNum eq num}">
					<li id="pageSum" class="active data" onclick="showPagePerformer(this)" style="cursor: pointer;"><a href="javascript:void(0)">${num}</a></li>
					</c:if>
					<c:if test="${performerPageNum != num}">
					<li id="pageSum" class="data" onclick="showPagePerformer(this)"><a href="javascript:void(0)">${num}</a></li>
					</c:if>
				</c:forEach>
                <li id="li" onclick="performerPageDown(${performerPageNum},${pageNum.size()})">
                    <a aria-label="Next" href="javascript:void(0)">
                        <span aria-hidden="true">»</span>
                    </a>
                </li>
            </ul>
        </nav>
        <div class="clearfix"></div>
    </div>
    	<!--演员信息修改 -->
    <form action="/film/adminPerformerServlet.do" method="post">		
	<div class="modal fade1 " id="update" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 class="modal-title" id="myModalLabel" style="text-align: center;">演员信息修改</h4>
                </div>
                <input type="hidden" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="filmName2" name="perId">
                <div class="text-center" style="margin-top: 15px; text-align: center;">     
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改演员名:</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="filmName2" name="perName">
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改演员别名:</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="filmName2" name="perNickName">
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改演员英文名:</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="filmName2" name="perTypr"> 
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改出生日期:</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="filmName2" name="perBirth">
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改身高：</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="filmName2" name="perHeight">
                        </div>
                    </div>
                  
                    
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改性别:</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="director2" name="perSex">
                        </div>
                    </div>
                  
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改国籍:</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="star2" name="perNationnality">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改出生地:</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="filmName2" name="perBirthPlace">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改导演星座:</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="playTime2" name="perStar">
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改演员介绍:</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="playTime2" name="perIntroduce">
                        </div>
                    </div>
                      <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">修改演员图片:</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="playTime2" name="perImg">
                        </div>
                    </div>
                </div>
                <input type="hidden" id="PerformerIf" name="PerformerIf" value="updatePerformer">
                <div class="modal-footer" style="text-align: center;">
                    <button id="but4" type="submit" class="btn btn-danger" data-dismiss="modal">修改</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
	</form>
    <!--添加弹出框 -->
    <form action="/film/adminAddPerformer.do" method="post" enctype="multipart/form-data" onsubmit="return checkForm()">	
    <div class="modal fade" id="add" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button id="btnclose" type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 class="modal-title" id="myModalLabel" style="text-align: center;">演员信息添加</h4>
                </div>
                <div class="text-center" style="margin-top: 15px; text-align: center;">
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员名称</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="filmName2" name="perName">
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员别名</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="filmName2" name="perNickName">
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员英文名</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="filmName2" name="perTypr">
                        </div>
                    </div>
                    <div class="form-group">
	                        <label for="firstname" class="col-sm-3 control-label">电影图片</label>
	                        <div class="">
	                            <input type="file" name="filmImg" style="margin-left: 0px; display: inherit;width: 230px;" >
	                        </div>
	                 </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员出生日期</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="filmName2" name="perBirth">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员身高</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="director2" name="perHeight">
                        </div>
                    </div>
                  
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员性别</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="star2" name="perSex"	>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员国籍</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="filmName2" name="perNationnality">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员出生地</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="playTime2" name="perBirthPlace">
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员星座</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="playTime2" name="perStar">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员介绍</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="playTime2" name="perIntroduce">
                        </div>
                    </div>
                     
       			   <!--  <input type="hidden" id="PerformerIf" name="PerformerIf" value="addPerformer"> -->
                </div>
                <div class="modal-footer" style="text-align: center;">             
                    <button id="but4" type="submit" class="btn btn-danger" data-dismiss="modal">添加</button>
                </div>
            </div>
           
        </div>
    	
    </div>
    </form>
	
	<!--演员明细--> 
	     <div class="modal fade2" id="definite" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button id="btnclose" type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 class="modal-title" id="myModalLabel" style="text-align: center;">演员信息展示</h4>
                </div>
                <div class="text-center" style="margin-top: 15px; text-align: center;">
                	 <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员Id</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="filmName2" name="perId" readonly>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员名称</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="filmName2" name="perName" readonly>
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员别名</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="filmName2" name="perNickName" readonly>
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员英文名</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="filmName2" name="perTypr" readonly>
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员出生日期</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="filmName2" name="perBirth" readonly>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员身高</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="director2" name="perHeight" readonly>
                        </div>
                    </div>
                  
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员性别</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="star2" name="perSex" readonly>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员国籍</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="filmName2" name="perNationnality" readonly>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员出生地</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="playTime2" name="perBirthPlace" readonly>
                        </div>
                    </div>
                     <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员星座</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="playTime2" name="perStar" readonly>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">演员介绍</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="playTime2" name="perIntroduce" readonly>
                        </div>
                    </div>
       			    <div class="form-group">
                        <label for="firstname" class="col-sm-3 control-label">图片</label>
                        <div class="">
                            <input type="text" class="form-control" style="margin-left: 0px; display: inherit;width: 230px;" id="playTime2" name="per_Img" readonly>
                        </div>
                    </div>
                </div>
              
            </div>
           
        </div>
    
    </div>
    
  	<div align="center" style="margin-bottom: 10px;padding-top: 10px; border-top: 1px solid #b3a6a6;">
        <button id="but2" type="button" class="btn btn-success" data-toggle="modal" data-target="#add" style=" width: 100px; height: 40px; line-height: 30px;">
            <span style="color:white; font-weight: 800;font-size: 16px;">添加</span>
        </button>
    </div>
</div>
<script>
$("#but2").click(function(){
	$("#add").fadeIn(500);
})
$(".detailBtn").click(function(){
	$("#definite").fadeIn(500);
})
$(".updateBtn").click(function(){
	$("#update").fadeIn(500);
})
$("#but4").click(function(){
	$("#add").fadeOut(500);
	$("#update").fadeOut(500);
	$("#definite").fadeOut(500);
})
$(".close").click(function(){
	$("#add").fadeOut(500);
	$("#update").fadeOut(500);
	$("#definite").fadeOut(500);
})
</script>
</body>
</html>